package com.bskj.common.bean.vo;

import java.util.Date;

import com.bskj.common.utils.DateTimeUtil;

/**
 * 无感支付平台，车辆出场请求Vo
 * 
 * @author lishi
 * @date 2018年5月14日 上午10:13:54
 */
public class NoSenseParkingOutReqVo extends NoSenseParkingBaseVo {
	private String amount; //收费金额 单位分
	private String clientIp; // 机器IP
	private String tradeScene; // 停车类型（车场停车-PARKING，车位停车）
	private String startTime; //进场时间 yyyyMMddHHmmss
	private String endTime; // 出场时间 yyyyMMddHHmmss
	private String plateNumber; //车牌号码
	private String carType; //车辆类型（小型车  大型车）
	private String parkingName; //停车场名字
	private String mchId; //停车场商户号

	public String getBody() {
		return parkingName + "停车费";
	}

	public String getSubject() {
		return getBody();
	}

	public String getRemark() {
		return getBody();
	}

	public NoSenseParkingOutReqVo(String appid, String type, String signType, String sign) {
		super(appid, type, signType, sign);
		this.setMethod("xft.parking.out");
	}

	public String getAmount() {
		return amount;
	}

	public void setAmount(String amount) {
		this.amount = amount;
	}

	public String getClientIp() {
		return clientIp;
	}

	public void setClientIp(String clientIp) {
		this.clientIp = clientIp;
	}

	public String getTradeScene() {
		return tradeScene;
	}

	public void setTradeScene(String tradeScene) {
		this.tradeScene = tradeScene;
	}

	public String getStartTime() {
		return startTime;
	}

	public void setStartTime(String startTime) {
		this.startTime = startTime;
	}

	public String getEndTime() {
		return endTime;
	}

	public void setEndTime(String endTime) {
		this.endTime = endTime;
	}

	public String getChargingTime() {
		long chargingTime = 0;
		try {
			Date startDate = DateTimeUtil.string2Date(startTime,"yyyyMMddHHmmss");
			Date endDate = DateTimeUtil.string2Date(endTime,"yyyyMMddHHmmss");
			chargingTime = (endDate.getTime() - startDate.getTime()) / 1000;
		} catch (Exception e) {
			e.printStackTrace();
		}
		return chargingTime + "";
	}

	public String getPlateNumber() {
		return plateNumber;
	}

	public void setPlateNumber(String plateNumber) {
		this.plateNumber = plateNumber;
	}

	public String getCarType() {
		return carType;
	}

	public void setCarType(String carType) {
		this.carType = carType;
	}

	public String getParkingName() {
		return parkingName;
	}

	public void setParkingName(String parkingName) {
		this.parkingName = parkingName;
	}

	public String getMchId() {
		return mchId;
	}

	public void setMchId(String mchId) {
		this.mchId = mchId;
	}
}
